var app = angular.module('conversionTool', ['smart-table' ]);

app.controller('manageTaskFlowCtrl', [ '$scope', '$http', function($scope, $http) {
	$scope.itemsByPage=10;
	
	$scope.taskflows=[];
	
	$scope.taskflowsDisplay=[].concat($scope.taskflows);
	
	$scope.getTaskFlows = function() {

		$http.post('/rest/task/getTaskflows').success(function(data) {
			
			$scope.taskflows=data;
			
			$scope.taskflowsDisplay=[].concat($scope.taskflows);
			
			

		}).error(function(data) {
			console.log(data);
		});

	}
	
	$scope.getTaskFlows();
	
	
	
	$scope.viewLog =function(id)
	{
		location.href="/task/viewLogDetail?type=taskFlowLog&id="+id;
	}
	
	
	$scope.viewTask=function(id){
		location.href="/task/viewTaskFlow?id="+id;
	}
	
	
	
	
	

} ]);